#include <MuteLabel.h>

#include <main.h>

#include <Theme.h>



MuteLabel::MuteLabel(QWidget  *parent, 
		     Step     *step)
  : StepLabel(parent, step)
{
    QFont font(MUTE_FONT);
    setFont(font);
}



void MuteLabel::set_mute(bool muted, bool hsoloed, bool vsoloed)
{
    //
    //  set background color
    //
    if (muted)
    {
        setPaletteBackgroundColor(g_theme->get_color(Theme::kMutedBackgroundColor));
    }
    else
    {
        setPaletteBackgroundColor(g_theme->get_color(Theme::kDefaultBackgroundColor));
    }

    char buf[16];
    sprintf(buf, "%s%s%s", muted ? "M" : "", hsoloed ? "H" : "", vsoloed ? "V" : "");
    setText(buf);
}







